package com.itnoob.event;

import com.itnoob.service.OrderService;
import com.itnoob.status.OrderStatusEnum;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;

import java.time.Clock;

/**
 * 封装事件对象
 * @author zhoujun
 * @date 2025/3/20 20:43
 */

public class OrderStatusChangeEvent extends ApplicationEvent {



    private String orderId;

    private OrderStatusEnum orderStatus;

    public OrderStatusChangeEvent(Object source, String orderId, OrderStatusEnum orderStatus) {
        super(source);
        this.orderId = orderId;
        this.orderStatus = orderStatus;
    }

    public OrderStatusChangeEvent(Object source, Clock clock, String orderId, OrderStatusEnum orderStatus) {
        super(source, clock);
        this.orderId = orderId;
        this.orderStatus = orderStatus;
    }


    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public OrderStatusEnum getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(OrderStatusEnum orderStatus) {
        this.orderStatus = orderStatus;
    }
}
